<template>
  <div id="app">
    <SearchMain> </SearchMain>
  </div>
</template>
<script>
import SearchMain from "./views/SearchMain";

export default {
  components: {
    SearchMain
  },
  mounted() {
    if (this._isMobile()) {
      //手机端入口
      console.log("这是手机端");
      // this.$router.replace("/Index");
    } else {
      //pc端入口文件
      console.log("这pc端");
      // this.$router.replace("/Windex");
    }
  },
  methods: {
    _isMobile() {
      let flag = navigator.userAgent.match(
        /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
      );
      return flag;
    }
  }
};
</script>
<style lang="scss">
#app {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
}
</style>
